import { createRouter, createWebHistory } from 'vue-router'
import { power, setSystem } from './list'

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/Login.vue'),
    meta: {
      title: '登录'
    }
  },
  {
    path: '/index',
    name: 'index',
    component: () => import('@/views/index/Index.vue'),
    meta: {
      title: '主页'
    }
  },
  ...power,
  ...setSystem

]
const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
